package com.lw.ssm.mapper;

import com.lw.ssm.pojo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/10 9:49
 */
public interface StudentMapper {
    @Select("select * from student where id=#{id}")
    Student findById(Long id);

    @Select("select * from student")
    List<Student> findAll();

    int addStudent(Student student);

    @Delete("delete from student where id=#{id}")
    int deleteById(Long id);

    int updateById(Student student);
}
